﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using CryptoCompressNew;
using NUnit.Framework;

namespace CryptoCompressNewTests
{
    [TestFixture]
    public class Class1
    {
        [Test]
        public void CryptDecrypt()
        {
            System.IO.File.Delete("testfile.txt.dnpcrypt"); 
            Crypt.File( "testfile.txt" , "mypassword");

            System.IO.File.Delete("testfileRef.txt");
            System.IO.File.Move( "testfile.txt" , "testfileRef.txt");
            Decrypt.File("testfile.txt.dnpcrypt", "mypassword");

            FileAssert.AreEqual("testfileRef.txt", "testfile.txt");



        }

        [Test]
        public void DecryptTest()
        {
            Decrypt.File("cryptedInput.txt.dnpcrypt", "mypassword");
 
            FileAssert.AreEqual( "referenceForDecrypt.txt" , "cryptedInput.txt");

        }
 
    
    }
}
